Here's what I got:
Object currObj = current
Skip SkipMod = createString()
ModName_ oModRef
for oModRef in currObj<-"*" do
{
string oModName = name(oModRef)
string linkModNameWithPath = path(oModRef) "/" oModName
put(SkipMod, linkModNameWithPath, "")
}
for e in SkipMod do
{
Module m = read(string key SkipMod, false)
}
moheganburnerIII - Thu Oct 06 22:39:32 EDT 2011 |
Re: Reading Modules from SkipList without visually opening the module Since you already have the 'false' parameter in your 'read' call, the module should open invisibly. What is the problem with opening the module? What are you trying to do? There are in fact some things that you can do without opening the module, e.g. query a module attribute or rename it. Regards, Mathias Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |
Re: Reading Modules from SkipList without visually opening the module Well, previously I was using a string array:
string s[] = "/folderpath/module1 name", "/folderpath"module2 name"}
for i in 0:1 do
{
Module m = read(s[i], false)
}
Skip s = createString()
put(s, /folderpath/module1 name, "")
put(s, /folderpath/module2 name, "")
for e in s do
{
Module m = read(string key s, false)
}
|
Re: Reading Modules from SkipList without visually opening the module I'm a little ignorant on this 'casting' stuff, but try changing this: ... Module m = read(string key SkipMod, false) to this: ... string NameMod = (string key SkipMod) ... read(NameMod, false) I think the syntax of the "key" command requires the parentheis around the 3 words each time, and you might as well just do that since it makes the code easier to read.
You could of course also do this: ... put(SkipMod, linkModNameWithPath, linkModNameWithPath) for NameMod in SkipMod do { Module m = read(NameMod, false) } And of course routinely load the standard view since you rarely care what view is loaded and want to avoid firing off attr DXL bla bla bla: .. Module m = read(NameMod, false, true) |
Re: Reading Modules from SkipList without visually opening the module |
Re: Reading Modules from SkipList without visually opening the module moheganburnerIII - Fri Oct 07 16:05:01 EDT 2011 Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |
Re: Reading Modules from SkipList without visually opening the module Mathias Mamsch - Fri Oct 07 16:48:28 EDT 2011 Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS The way I see it either 1) declaring something a "Module" (as I did with "Module m =") or 2) reading a module path from a skip key (as I did with "string key s"), is why it reads visibly. Normally, I'd test myself to find out exactly which part was making it do what it did, but I ran outta time Friday. I'll test on Monday and will post back for closure. Oh, and I use 9.2. |
Re: Reading Modules from SkipList without visually opening the module Scratch that. When I was using the string array method, I was using "Module m =", and that definitely read the modules invisibly. So I guess the reason must be that I was calling the path via "string key SkipMod". I don't get it either. In my eyes Module m = read(string key SkipMod, false)
string NameMod = (string key SkipMod) Module m = read(NameMod, false)
|
Re: Reading Modules from SkipList without visually opening the module moheganburnerIII - Sun Oct 09 14:49:43 EDT 2011 Scratch that. When I was using the string array method, I was using "Module m =", and that definitely read the modules invisibly. So I guess the reason must be that I was calling the path via "string key SkipMod". I don't get it either. In my eyes Module m = read(string key SkipMod, false)
string NameMod = (string key SkipMod) Module m = read(NameMod, false)
Skip SkipMod = createString()
put(SkipMod, "/Testing/CreateObject", "/Testing/CreateObject")
string Data
for Data in SkipMod do
{ Module m = read(string key SkipMod, false) // << Original Syntax
}
|